projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e42985
)
i2c: i2c-cdns: Reorder timeout loop for interrupt waiting
author
Moritz Fischer
<
[email protected]
>
Mon, 16 Jan 2017 17:50:45 +0000
(09:50 -0800)
committer
Heiko Schocher
<
[email protected]
>
Wed, 18 Jan 2017 05:38:14 +0000
(06:38 +0100)
Reorder the timeout loop such that we first check if the
condition is already true, and then call udelay() so if
the condition is already true, break early.
Reviewed-by: Michal Simek <
[email protected]
>
Signed-off-by: Moritz Fischer <
[email protected]
>
Cc: Heiko Schocher <
[email protected]
>
Cc: Michal Simek <
[email protected]
>
Cc:
[email protected]
drivers/i2c/i2c-cdns.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/i2c-cdns.c
b/drivers/i2c/i2c-cdns.c
index c1d64273c50bca27d125e6c9fbee117e0d48a8ff..1c9fda8f66767bd13d18ac48e4639e3a303500e9 100644
(file)
--- a/
drivers/i2c/i2c-cdns.c
+++ b/
drivers/i2c/i2c-cdns.c
@@
-130,10
+130,10
@@
static u32 cdns_i2c_wait(struct cdns_i2c_regs *cdns_i2c, u32 mask)
int timeout, int_status;
for (timeout = 0; timeout < 100; timeout++) {
- udelay(100);
int_status = readl(&cdns_i2c->interrupt_status);
if (int_status & mask)
break;
+ udelay(100);
}
/* Clear interrupt status flags */